home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / devel-docs / libgimp / sgml / gimpchannel.sgml < prev    next >
Encoding:
Text File  |  2003-05-20  |  20.5 KB  |  479 lines

  1. <refentry id="libgimp-gimpchannel" revision="19 Jan 2001">
  2. <refmeta>
  3. <refentrytitle>gimpchannel</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. <refmiscinfo>LIBGIMP Library</refmiscinfo>
  6. </refmeta>
  7.  
  8. <refnamediv>
  9. <refname>gimpchannel</refname><refpurpose></refpurpose>
  10. </refnamediv>
  11.  
  12. <refsynopsisdiv><title>Synopsis</title>
  13. <synopsis>
  14.  
  15.  
  16.  
  17. <link linkend="gint32">gint32</link>      <link linkend="gimp-channel-new">gimp_channel_new</link>                (<link linkend="gint32">gint32</link> image_ID,
  18.                                              <link linkend="gchar">gchar</link> *name,
  19.                                              <link linkend="guint">guint</link> width,
  20.                                              <link linkend="guint">guint</link> height,
  21.                                              <link linkend="gdouble">gdouble</link> opacity,
  22.                                              <link linkend="guchar">guchar</link> *color);
  23. <link linkend="gint32">gint32</link>      <link linkend="gimp-channel-copy">gimp_channel_copy</link>               (<link linkend="gint32">gint32</link> channel_ID);
  24. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-delete">gimp_channel_delete</link>             (<link linkend="gint32">gint32</link> channel_ID);
  25. <link linkend="gchar">gchar</link>*      <link linkend="gimp-channel-get-name">gimp_channel_get_name</link>           (<link linkend="gint32">gint32</link> channel_ID);
  26. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-set-name">gimp_channel_set_name</link>           (<link linkend="gint32">gint32</link> channel_ID,
  27.                                              <link linkend="gchar">gchar</link> *name);
  28. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-get-visible">gimp_channel_get_visible</link>        (<link linkend="gint32">gint32</link> channel_ID);
  29. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-set-visible">gimp_channel_set_visible</link>        (<link linkend="gint32">gint32</link> channel_ID,
  30.                                              <link linkend="gboolean">gboolean</link> visible);
  31. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-get-show-masked">gimp_channel_get_show_masked</link>    (<link linkend="gint32">gint32</link> channel_ID);
  32. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-set-show-masked">gimp_channel_set_show_masked</link>    (<link linkend="gint32">gint32</link> channel_ID,
  33.                                              <link linkend="gboolean">gboolean</link> show_masked);
  34. <link linkend="gdouble">gdouble</link>     <link linkend="gimp-channel-get-opacity">gimp_channel_get_opacity</link>        (<link linkend="gint32">gint32</link> channel_ID);
  35. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-set-opacity">gimp_channel_set_opacity</link>        (<link linkend="gint32">gint32</link> channel_ID,
  36.                                              <link linkend="gdouble">gdouble</link> opacity);
  37. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-get-color">gimp_channel_get_color</link>          (<link linkend="gint32">gint32</link> channel_ID,
  38.                                              <link linkend="guchar">guchar</link> *red,
  39.                                              <link linkend="guchar">guchar</link> *green,
  40.                                              <link linkend="guchar">guchar</link> *blue);
  41. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-set-color">gimp_channel_set_color</link>          (<link linkend="gint32">gint32</link> channel_ID,
  42.                                              <link linkend="guchar">guchar</link> red,
  43.                                              <link linkend="guchar">guchar</link> green,
  44.                                              <link linkend="guchar">guchar</link> blue);
  45. <link linkend="gint">gint</link>        <link linkend="gimp-channel-get-tattoo">gimp_channel_get_tattoo</link>         (<link linkend="gint32">gint32</link> channel_ID);
  46. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-channel-set-tattoo">gimp_channel_set_tattoo</link>         (<link linkend="gint32">gint32</link> channel_ID,
  47.                                              <link linkend="gint">gint</link> tattoo);
  48. #define     <link linkend="gimp-channel-get-image-id">gimp_channel_get_image_id</link>
  49. </synopsis>
  50. </refsynopsisdiv>
  51.  
  52.  
  53.  
  54.  
  55.  
  56. <refsect1>
  57. <title>Description</title>
  58. <para>
  59.  
  60. </para>
  61. </refsect1>
  62.  
  63. <refsect1>
  64. <title>Details</title>
  65. <refsect2>
  66. <title><anchor id="gimp-channel-new">gimp_channel_new ()</title>
  67. <programlisting><link linkend="gint32">gint32</link>      gimp_channel_new                (<link linkend="gint32">gint32</link> image_ID,
  68.                                              <link linkend="gchar">gchar</link> *name,
  69.                                              <link linkend="guint">guint</link> width,
  70.                                              <link linkend="guint">guint</link> height,
  71.                                              <link linkend="gdouble">gdouble</link> opacity,
  72.                                              <link linkend="guchar">guchar</link> *color);</programlisting>
  73. <para>
  74. Create a new channel.
  75. </para>
  76. <para>
  77. This procedure creates a new channel with the specified width and
  78. height. Name, opacity, and color are also supplied parameters. The
  79. new channel still needs to be added to the image, as this is not
  80. automatic. Add the new channel with the 'gimp_image_add_channel'
  81. command. Other attributes such as channel show masked, should be set
  82. with explicit procedure calls. The channel's contents are undefined
  83. initially.</para>
  84. <para>
  85.  
  86. </para><informaltable pgwide=1 frame="none" role="params">
  87. <tgroup cols="2">
  88. <colspec colwidth="2*">
  89. <colspec colwidth="8*">
  90. <tbody>
  91. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  92. <entry> The image to which to add the channel.
  93. </entry></row>
  94. <row><entry align="right"><parameter>name</parameter> :</entry>
  95. <entry> The channel name.
  96. </entry></row>
  97. <row><entry align="right"><parameter>width</parameter> :</entry>
  98. <entry> The channel width.
  99. </entry></row>
  100. <row><entry align="right"><parameter>height</parameter> :</entry>
  101. <entry> The channel height.
  102. </entry></row>
  103. <row><entry align="right"><parameter>opacity</parameter> :</entry>
  104. <entry> The channel opacity.
  105. </entry></row>
  106. <row><entry align="right"><parameter>color</parameter> :</entry>
  107. <entry> The channel compositing color.
  108. </entry></row>
  109. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The newly created channel.
  110. </entry></row>
  111. </tbody></tgroup></informaltable></refsect2>
  112. <refsect2>
  113. <title><anchor id="gimp-channel-copy">gimp_channel_copy ()</title>
  114. <programlisting><link linkend="gint32">gint32</link>      gimp_channel_copy               (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
  115. <para>
  116. Copy a channel.
  117. </para>
  118. <para>
  119. This procedure copies the specified channel and returns the copy.</para>
  120. <para>
  121.  
  122. </para><informaltable pgwide=1 frame="none" role="params">
  123. <tgroup cols="2">
  124. <colspec colwidth="2*">
  125. <colspec colwidth="8*">
  126. <tbody>
  127. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  128. <entry> The channel to copy.
  129. </entry></row>
  130. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The newly copied channel.
  131. </entry></row>
  132. </tbody></tgroup></informaltable></refsect2>
  133. <refsect2>
  134. <title><anchor id="gimp-channel-delete">gimp_channel_delete ()</title>
  135. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_delete             (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
  136. <para>
  137. Delete a channel.
  138. </para>
  139. <para>
  140. This procedure deletes the specified channel. This must not be done
  141. if the gimage containing this channel was already deleted or if the
  142. channel was already removed from the image. The only case in which
  143. this procedure is useful is if you want to get rid of a channel
  144. which has not yet been added to an image.</para>
  145. <para>
  146.  
  147. </para><informaltable pgwide=1 frame="none" role="params">
  148. <tgroup cols="2">
  149. <colspec colwidth="2*">
  150. <colspec colwidth="8*">
  151. <tbody>
  152. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  153. <entry> The channel to delete.
  154. </entry></row>
  155. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  156. </entry></row>
  157. </tbody></tgroup></informaltable></refsect2>
  158. <refsect2>
  159. <title><anchor id="gimp-channel-get-name">gimp_channel_get_name ()</title>
  160. <programlisting><link linkend="gchar">gchar</link>*      gimp_channel_get_name           (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
  161. <para>
  162. Get the name of the specified channel.
  163. </para>
  164. <para>
  165. This procedure returns the specified channel's name.</para>
  166. <para>
  167.  
  168. </para><informaltable pgwide=1 frame="none" role="params">
  169. <tgroup cols="2">
  170. <colspec colwidth="2*">
  171. <colspec colwidth="8*">
  172. <tbody>
  173. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  174. <entry> The channel.
  175. </entry></row>
  176. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The channel name.
  177. </entry></row>
  178. </tbody></tgroup></informaltable></refsect2>
  179. <refsect2>
  180. <title><anchor id="gimp-channel-set-name">gimp_channel_set_name ()</title>
  181. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_set_name           (<link linkend="gint32">gint32</link> channel_ID,
  182.                                              <link linkend="gchar">gchar</link> *name);</programlisting>
  183. <para>
  184. Set the name of the specified channel.
  185. </para>
  186. <para>
  187. This procedure sets the specified channel's name.</para>
  188. <para>
  189.  
  190. </para><informaltable pgwide=1 frame="none" role="params">
  191. <tgroup cols="2">
  192. <colspec colwidth="2*">
  193. <colspec colwidth="8*">
  194. <tbody>
  195. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  196. <entry> The channel.
  197. </entry></row>
  198. <row><entry align="right"><parameter>name</parameter> :</entry>
  199. <entry> The new channel name.
  200. </entry></row>
  201. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  202. </entry></row>
  203. </tbody></tgroup></informaltable></refsect2>
  204. <refsect2>
  205. <title><anchor id="gimp-channel-get-visible">gimp_channel_get_visible ()</title>
  206. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_get_visible        (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
  207. <para>
  208. Get the visibility of the specified channel.
  209. </para>
  210. <para>
  211. This procedure returns the specified channel's visibility.</para>
  212. <para>
  213.  
  214. </para><informaltable pgwide=1 frame="none" role="params">
  215. <tgroup cols="2">
  216. <colspec colwidth="2*">
  217. <colspec colwidth="8*">
  218. <tbody>
  219. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  220. <entry> The channel.
  221. </entry></row>
  222. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The channel visibility.
  223. </entry></row>
  224. </tbody></tgroup></informaltable></refsect2>
  225. <refsect2>
  226. <title><anchor id="gimp-channel-set-visible">gimp_channel_set_visible ()</title>
  227. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_set_visible        (<link linkend="gint32">gint32</link> channel_ID,
  228.                                              <link linkend="gboolean">gboolean</link> visible);</programlisting>
  229. <para>
  230. Set the visibility of the specified channel.
  231. </para>
  232. <para>
  233. This procedure sets the specified channel's visibility.</para>
  234. <para>
  235.  
  236. </para><informaltable pgwide=1 frame="none" role="params">
  237. <tgroup cols="2">
  238. <colspec colwidth="2*">
  239. <colspec colwidth="8*">
  240. <tbody>
  241. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  242. <entry> The channel.
  243. </entry></row>
  244. <row><entry align="right"><parameter>visible</parameter> :</entry>
  245. <entry> The new channel visibility.
  246. </entry></row>
  247. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  248. </entry></row>
  249. </tbody></tgroup></informaltable></refsect2>
  250. <refsect2>
  251. <title><anchor id="gimp-channel-get-show-masked">gimp_channel_get_show_masked ()</title>
  252. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_get_show_masked    (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
  253. <para>
  254. Get the composite method of the specified channel.
  255. </para>
  256. <para>
  257. This procedure returns the specified channel's composite method. If
  258. it is non-zero, then the channel is composited with the image so
  259. that masked regions are shown. Otherwise, selected regions are
  260. shown.</para>
  261. <para>
  262.  
  263. </para><informaltable pgwide=1 frame="none" role="params">
  264. <tgroup cols="2">
  265. <colspec colwidth="2*">
  266. <colspec colwidth="8*">
  267. <tbody>
  268. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  269. <entry> The channel.
  270. </entry></row>
  271. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The channel composite method.
  272. </entry></row>
  273. </tbody></tgroup></informaltable></refsect2>
  274. <refsect2>
  275. <title><anchor id="gimp-channel-set-show-masked">gimp_channel_set_show_masked ()</title>
  276. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_set_show_masked    (<link linkend="gint32">gint32</link> channel_ID,
  277.                                              <link linkend="gboolean">gboolean</link> show_masked);</programlisting>
  278. <para>
  279. Set the composite method of the specified channel.
  280. </para>
  281. <para>
  282. This procedure sets the specified channel's composite method. If it
  283. is non-zero, then the channel is composited with the image so that
  284. masked regions are shown. Otherwise, selected regions are shown.</para>
  285. <para>
  286.  
  287. </para><informaltable pgwide=1 frame="none" role="params">
  288. <tgroup cols="2">
  289. <colspec colwidth="2*">
  290. <colspec colwidth="8*">
  291. <tbody>
  292. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  293. <entry> The channel.
  294. </entry></row>
  295. <row><entry align="right"><parameter>show_masked</parameter> :</entry>
  296. <entry> The new channel composite method.
  297. </entry></row>
  298. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  299. </entry></row>
  300. </tbody></tgroup></informaltable></refsect2>
  301. <refsect2>
  302. <title><anchor id="gimp-channel-get-opacity">gimp_channel_get_opacity ()</title>
  303. <programlisting><link linkend="gdouble">gdouble</link>     gimp_channel_get_opacity        (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
  304. <para>
  305. Get the opacity of the specified channel.
  306. </para>
  307. <para>
  308. This procedure returns the specified channel's opacity.</para>
  309. <para>
  310.  
  311. </para><informaltable pgwide=1 frame="none" role="params">
  312. <tgroup cols="2">
  313. <colspec colwidth="2*">
  314. <colspec colwidth="8*">
  315. <tbody>
  316. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  317. <entry> The channel.
  318. </entry></row>
  319. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The channel opacity.
  320. </entry></row>
  321. </tbody></tgroup></informaltable></refsect2>
  322. <refsect2>
  323. <title><anchor id="gimp-channel-set-opacity">gimp_channel_set_opacity ()</title>
  324. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_set_opacity        (<link linkend="gint32">gint32</link> channel_ID,
  325.                                              <link linkend="gdouble">gdouble</link> opacity);</programlisting>
  326. <para>
  327. Set the opacity of the specified channel.
  328. </para>
  329. <para>
  330. This procedure sets the specified channel's opacity.</para>
  331. <para>
  332.  
  333. </para><informaltable pgwide=1 frame="none" role="params">
  334. <tgroup cols="2">
  335. <colspec colwidth="2*">
  336. <colspec colwidth="8*">
  337. <tbody>
  338. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  339. <entry> The channel.
  340. </entry></row>
  341. <row><entry align="right"><parameter>opacity</parameter> :</entry>
  342. <entry> The new channel opacity.
  343. </entry></row>
  344. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  345. </entry></row>
  346. </tbody></tgroup></informaltable></refsect2>
  347. <refsect2>
  348. <title><anchor id="gimp-channel-get-color">gimp_channel_get_color ()</title>
  349. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_get_color          (<link linkend="gint32">gint32</link> channel_ID,
  350.                                              <link linkend="guchar">guchar</link> *red,
  351.                                              <link linkend="guchar">guchar</link> *green,
  352.                                              <link linkend="guchar">guchar</link> *blue);</programlisting>
  353. <para>
  354. Get the compositing color of the specified channel.
  355. </para>
  356. <para>
  357. This procedure returns the specified channel's compositing color.</para>
  358. <para>
  359.  
  360. </para><informaltable pgwide=1 frame="none" role="params">
  361. <tgroup cols="2">
  362. <colspec colwidth="2*">
  363. <colspec colwidth="8*">
  364. <tbody>
  365. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  366. <entry> The channel.
  367. </entry></row>
  368. <row><entry align="right"><parameter>red</parameter> :</entry>
  369. <entry>
  370. </entry></row>
  371. <row><entry align="right"><parameter>green</parameter> :</entry>
  372. <entry>
  373. </entry></row>
  374. <row><entry align="right"><parameter>blue</parameter> :</entry>
  375. <entry> The channel compositing color.
  376. </entry></row>
  377. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  378. </entry></row>
  379. </tbody></tgroup></informaltable></refsect2>
  380. <refsect2>
  381. <title><anchor id="gimp-channel-set-color">gimp_channel_set_color ()</title>
  382. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_set_color          (<link linkend="gint32">gint32</link> channel_ID,
  383.                                              <link linkend="guchar">guchar</link> red,
  384.                                              <link linkend="guchar">guchar</link> green,
  385.                                              <link linkend="guchar">guchar</link> blue);</programlisting>
  386. <para>
  387. Set the compositing color of the specified channel.
  388. </para>
  389. <para>
  390. This procedure sets the specified channel's compositing color.</para>
  391. <para>
  392.  
  393. </para><informaltable pgwide=1 frame="none" role="params">
  394. <tgroup cols="2">
  395. <colspec colwidth="2*">
  396. <colspec colwidth="8*">
  397. <tbody>
  398. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  399. <entry> The channel.
  400. </entry></row>
  401. <row><entry align="right"><parameter>red</parameter> :</entry>
  402. <entry>
  403. </entry></row>
  404. <row><entry align="right"><parameter>green</parameter> :</entry>
  405. <entry>
  406. </entry></row>
  407. <row><entry align="right"><parameter>blue</parameter> :</entry>
  408. <entry> The new channel compositing color.
  409. </entry></row>
  410. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  411. </entry></row>
  412. </tbody></tgroup></informaltable></refsect2>
  413. <refsect2>
  414. <title><anchor id="gimp-channel-get-tattoo">gimp_channel_get_tattoo ()</title>
  415. <programlisting><link linkend="gint">gint</link>        gimp_channel_get_tattoo         (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
  416. <para>
  417. Get the tattoo of the specified channel.
  418. </para>
  419. <para>
  420. This procedure returns the specified channel's tattoo. A tattoo is a
  421. unique and permanent identifier attached to a channel that can be
  422. used to uniquely identify a channel within an image even between
  423. sessions.</para>
  424. <para>
  425.  
  426. </para><informaltable pgwide=1 frame="none" role="params">
  427. <tgroup cols="2">
  428. <colspec colwidth="2*">
  429. <colspec colwidth="8*">
  430. <tbody>
  431. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  432. <entry> The channel.
  433. </entry></row>
  434. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The channel tattoo.
  435. </entry></row>
  436. </tbody></tgroup></informaltable></refsect2>
  437. <refsect2>
  438. <title><anchor id="gimp-channel-set-tattoo">gimp_channel_set_tattoo ()</title>
  439. <programlisting><link linkend="gboolean">gboolean</link>    gimp_channel_set_tattoo         (<link linkend="gint32">gint32</link> channel_ID,
  440.                                              <link linkend="gint">gint</link> tattoo);</programlisting>
  441. <para>
  442. Set the tattoo of the specified channel.
  443. </para>
  444. <para>
  445. This procedure sets the specified channel's tattoo. A tattoo is a
  446. unique and permanent identifier attached to a channel that can be
  447. used to uniquely identify a channel within an image even between
  448. sessions.</para>
  449. <para>
  450.  
  451. </para><informaltable pgwide=1 frame="none" role="params">
  452. <tgroup cols="2">
  453. <colspec colwidth="2*">
  454. <colspec colwidth="8*">
  455. <tbody>
  456. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  457. <entry> The channel.
  458. </entry></row>
  459. <row><entry align="right"><parameter>tattoo</parameter> :</entry>
  460. <entry> The new channel tattoo.
  461. </entry></row>
  462. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  463. </entry></row>
  464. </tbody></tgroup></informaltable></refsect2>
  465. <refsect2>
  466. <title><anchor id="gimp-channel-get-image-id">gimp_channel_get_image_id</title>
  467. <programlisting>#define gimp_channel_get_image_id  gimp_drawable_image
  468. </programlisting>
  469. <para>
  470.  
  471. </para></refsect2>
  472.  
  473. </refsect1>
  474.  
  475.  
  476.  
  477.  
  478. </refentry>
  479.